#parse('include.java')
#set($sp = $CSU.getSuperPackage($model.package,1))
#set($TYPE = $model.name)
#set($type = $CSU.getVariable($TYPE))
#if($sp)
package ${sp}.service;
#end

import java.util.List;

import wangjg.commons.page.Page;

import $!{model.package}.${TYPE};

public interface ${TYPE}Service {

	public ${TYPE} get${TYPE}(Long id);

	public void save(${TYPE} ${type});

	public void update(${TYPE} ${type});

	public void delete(${TYPE} ${type});

	public void batchDelete(String idseq) ;

#set($refFieldLst = $MU.getReferenceFields($model))
#foreach($field in $refFieldLst)
#set($methodName = 'findBy'+$CSU.getHumpWord($field.name))
	public List<${model.name}> ${methodName}($field.type $field.name);
#end

	public List<${TYPE}> pageQuery(Page page#allParams($model)) ;

#set($mtmList = $MU.getModelMtmList($model))
#foreach($mtm in $mtmList)
	#set($RelationItem = $CSU.getSimpleType($mtm.relation))
	#set($relationItem = $CSU.getVariable($RelationItem))
	#set($Model2 = $CSU.getSimpleType($mtm.anotherModel))
	#set($model2 = $CSU.getVariable($Model2))

	public void save${RelationItem}s(Long ${mtm.relationKey}, String ${mtm.anotherRelationKey}s);

	public List<Long> get${Model2}IdList(Long ${mtm.relationKey}) ;

	public List<${Model2}> get${Model2}List(Long ${mtm.relationKey});

#end

}
